<%@ page language="java" contentType="text/html; charset=UTF-8"  
    pageEncoding="UTF-8"%>  
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<title>欢迎</title>  
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript">
        var path="<%=path%>";
        $( document ).ready(function() {
            $("#codeImg").on("click",function(){
                $('#codeImg').prop('src',path+'/jcaptcha.jpg?nocache='+new Date().getTime());
            });
        });
    </script>
</head>  
<body>  
<h2>Hello World!</h2>  
  
<form method="post" action="login/login">  
    用户名：<input id="username" name="username" type="text"></input><br>  
    密  码：<input id="username" name="password" type="password"></input><br>  
    <span style="margin: 10px 0 0 10px;vertical-align: baseline;">请输入验证码：<input name="verifyCode" type="text" /></span>
    <img id="codeImg" style="vertical-align: bottom;margin: 10px 0 0 10px;cursor: pointer;"  alt="验证码" src="<%=path%>/jcaptcha.jpg">
    <input type="submit">  
</form>  
<span>当前IP：<%=request.getRemoteAddr() %></span>  
</body>  
</html>  